<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        console.log(15 & 8);        
        //  0000000000000000000000000001111 
        //& 0000000000000000000000000001000
        //= 0000000000000000000000000001000

        console.log(15 | 8);
        //  0000000000000000000000000001111 
        //| 0000000000000000000000000001000
        //= 0000000000000000000000000001111

        console.log(~ 15); 
        //~  0000000000000000000000000001111 
        //=  1111111111111111111111111110000  补码
        //   1111111111111111111111111101111  反码
        //   1000000000000000000000000010000  原码

        console.log(15 ^ 8);        
        //  0000000000000000000000000001111 
        //^ 0000000000000000000000000001000
        //= 0000000000000000000000000000111

        console.log(7 << 2);
        //  0000000000000000000000000000111 
        //= 0000000000000000000000000011100

        console.log(7 >> 2);
        //  0000000000000000000000000000111 
        //= 0000000000000000000000000000001
        
        console.log(7 >>> 2);       
        //  0000000000000000000000000000111 
        //= 0000000000000000000000000000001
    </script>
</head>
<body>
    
</body>
</html>